package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 章节购买表(ChapterPurchase)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-18 14:18:24
 */
@ApiModel("章节购买表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ChapterPurchase implements Serializable {
    private static final long serialVersionUID = -46886684962100828L;
        /**
    *主键
    * 主键
    * isnull 1
    */
    @ApiModelProperty(value="主键", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String chapterPurchaseId;

    /**
    * 书籍id
    * isnull 0
    */        @ApiModelProperty(value="书籍id",position=2)
    private String bookId;
    /**
    * 书籍名称
    * isnull 0
    */        @ApiModelProperty(value="书籍名称",position=3)
    private String bookName;
    /**
    * 章节id
    * isnull 0
    */        @ApiModelProperty(value="章节id",position=4)
    private String chapterId;
    /**
    * 章节名称
    * isnull 0
    */        @ApiModelProperty(value="章节名称",position=5)
    private String chapterName;
    /**
    * 作者id
    * isnull 0
    */        @ApiModelProperty(value="作者id",position=6)
    private String authorId;
    /**
    * 购买者id
    * isnull 0
    */        @ApiModelProperty(value="购买者id",position=7)
    private String userId;
    /**
    * 综合字典参数id
    * isnull 0
    */        @ApiModelProperty(value="综合字典参数id",position=8)
    private String parametersId;
    /**
    * 购买章节数
    * isnull 0
    */        @ApiModelProperty(value="购买章节数",position=9)
    private Integer chapterCount;
    /**
    * 是否购买成功
    * isnull 0
    */        @ApiModelProperty(value="是否购买成功",position=10)
    private Integer isBuy;
    /**
    * 订单创建时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="订单创建时间",position=11)
    private LocalDateTime createTime;
    /**
    * 消耗积分数量
    * isnull 0
    */        @ApiModelProperty(value="消耗积分数量",position=12)
    private Integer consumptionPoints;
        
    public String getChapterPurchaseId() {
        return chapterPurchaseId;
    }

    public void setChapterPurchaseId(String chapterPurchaseId) {
        this.chapterPurchaseId = chapterPurchaseId;
    }
        
    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }
        
    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }
        
    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }
        
    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }
        
    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }
        
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
        
    public String getParametersId() {
        return parametersId;
    }

    public void setParametersId(String parametersId) {
        this.parametersId = parametersId;
    }
        
    public Integer getChapterCount() {
        return chapterCount;
    }

    public void setChapterCount(Integer chapterCount) {
        this.chapterCount = chapterCount;
    }
        
    public Integer getIsBuy() {
        return isBuy;
    }

    public void setIsBuy(Integer isBuy) {
        this.isBuy = isBuy;
    }
        
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
        
    public Integer getConsumptionPoints() {
        return consumptionPoints;
    }

    public void setConsumptionPoints(Integer consumptionPoints) {
        this.consumptionPoints = consumptionPoints;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"chapterPurchaseId\":" + chapterPurchaseId +
                                  " ,\"bookId\":" + bookId +
                            " ,\"bookName\":" + bookName +
                            " ,\"chapterId\":" + chapterId +
                            " ,\"chapterName\":" + chapterName +
                            " ,\"authorId\":" + authorId +
                            " ,\"userId\":" + userId +
                            " ,\"parametersId\":" + parametersId +
                            " ,\"chapterCount\":" + chapterCount +
                            " ,\"isBuy\":" + isBuy +
                            " ,\"createTime\":" + createTime +
                            " ,\"consumptionPoints\":" + consumptionPoints +
                  '}';
    }


}
